package com.doit.demo05;

import java.util.concurrent.Callable;

public class My_Call implements Callable<Integer> {
     private int flag ;

    public My_Call() {
    }

    public My_Call(int flag)
    {

        this.flag = flag;
    }
    @Override
    public Integer call() throws Exception {

            int sum = 0;
            for (int i = 0; i <= flag; i++) {
                sum+=i;
            }
            return sum;

    }
}
